from ronglian_sms_sdk import SmsSDK
import json

accId = '2c94811c9035ff9f01907235fa310b6c'
accToken = '5b0606c75912484886943a0cb3582d63'
appId = '2c94811c9035ff9f01907235fbb60b73'




def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = phone
    datas = (code,)
    resp = sdk.sendMessage(tid, mobile, datas)
    print(resp)
    if(str(json.loads(resp).get("statusCode")) == "000000"):
        return True
    else:
        return False


